package bookpos.entity;
/*
 ---------------------------------------------
 CREATE TABLE `customer` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `CUSTOMERNO` varchar(36) NOT NULL,
  `CUSTOMERNAME` varchar(36) NOT NULL,
  `TELEPHONE` varchar(36) DEFAULT NULL,
  `ADDRESS` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `CUSTOMERNO` (`CUSTOMERNO`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
------------------------------------------------------------ 
 */

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * 账号信息实体类
 * @author WZB
 *
 */
@Entity
@Table(name = "bookpos_account")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Account implements java.io.Serializable {


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name ="ID",nullable=false,length=11)
	private Integer id;
	@Column(name ="role_id",length=11)
	private Integer roleId; //角色id
	@Column(name ="username",length=15)
	private String username;//账号
	@Column(name ="password",length=15)
	private String password;//密码
	@Column(name ="nickname",length=15)
	private String nickname;//昵称
	@Column(name ="sex",length=2)
	private String sex;//性别 男 女
	
	public Account(){
		this.sex="男";
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getRoleId() {
		return roleId;
	}
	public void setRoleId(Integer id) {
		this.roleId = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	
}
